package com.heima.utils.common;

import com.heima.model.user.pojos.User;

public class AppThreadLocalUtil {
    private final static ThreadLocal<User> WM_USER_THREAD_LOCAL = new ThreadLocal<>();

    public static void setUser(User user){
        WM_USER_THREAD_LOCAL.set(user);
    }

    public static User getUser(){
        return WM_USER_THREAD_LOCAL.get();
    }

    public static void removeUser(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
